import React, { Component } from "react";
import "./Mvcont.css";
class Mvcont extends Component {
  render() {
    let { mvarr } = this.props;
    return (
      <div className="mv">
        <ul>
          {mvarr.map((item) => {
            return (
              <li key={item.id}>
                <img className="imgtu" src={item.cover} alt="123" />
                <h1>
                  专辑名称：
                  {item.name.length >= 5
                    ? item.name.substring(0, 5) + "..."
                    : item.name}
                </h1>
                <h2>歌手名称：{item.artistName}</h2>
              </li>
            );
          })}
        </ul>
      </div>
    );
  }
}

export default Mvcont;
